module.exports = app => {
    const multer = require('multer')
    const upload = multer({ dest: __dirname + '/../upload' })
    app.post('/upload', upload.single('file'), async(req, res) => {
        const file = req.file
        file.url = `${file.filename}`
        res.send(file)
    })
}